package com.xuecheng.comment.agent;

import com.xuecheng.api.media.model.dto.MediaDTO;
import com.xuecheng.comment.agent.hystrix.MediaApiAgentFallbackFactory;
import com.xuecheng.common.constant.XcFeignServiceNameList;
import com.xuecheng.common.domain.response.RestResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Created on 2021/04/05/19:43 周一
 *
 * @author Lantin
 */

@FeignClient(value = XcFeignServiceNameList.XC_MEDIA_SERVICE,fallbackFactory = MediaApiAgentFallbackFactory.class)
public interface MediaApiAgent {


    @GetMapping("media/l/media/{mediaId}")
    RestResponse<MediaDTO> getMediaById(@PathVariable Long mediaId);

}
